#CC = aarch64-linux-gnu-gcc 
CC = gcc 

INCLUDE = -I.

LIB=-lpthread  

OBJ += $(patsubst %.c, %.o, $(wildcard *.c))

CFLAGS = -O0 -g3 -Wall
target = main

all:$(OBJ)
	$(CC)  out/*.o -o $(target) $(LIB) 
	mv $(target) out
%.o:%.c
	$(CC) $(CFLAGS)  -c $< -o $@ $(INCLUDE) 
	mv $@ out
clean:
	rm -rf out/*
.PHONY: clean
